home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
netlib
/
RCS
/
Net_EtherAddrToString.c,v
< prev
next >
Wrap
Text File
|
1991-10-22
|
2KB
|
117 lines
head 1.2;
branch ;
access ;
symbols sprited:1.2.1;
locks ; strict;
comment @ * @;
1.2
date 90.09.11.14.43.43; author kupfer; state Exp;
branches 1.2.1.1;
next 1.1;
1.1
date 88.11.21.09.10.07; author mendel; state Exp;
branches ;
next ;
1.2.1.1
date 91.10.22.14.52.56; author kupfer; state Exp;
branches ;
next ;
desc
@Formed from net.c of src/lib/old/net.c.
@
1.2
log
@Lint.
@
text
@/*
* Net_EtherAddrToString.c --
*
* Convert an ethernet address to a string.
*
* Copyright 1987 Regents of the University of California
* All rights reserved.
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies. The University of California
* makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*/
#ifndef lint
static char rcsid[] = "$Header: /sprite/src/lib/net/RCS/Net_EtherAddrToString.c,v 1.1 88/11/21 09:10:07 mendel Exp Locker: kupfer $ SPRITE (Berkeley)";
#endif not lint
#include "sprite.h"
#include <stdio.h>
#include "net.h"
/*
*----------------------------------------------------------------------
*
* Net_EtherAddrToString --
*
* Convert Ethernet address to printable representation.
*
* Results:
* Address of the string buffer.
*
* Side effects:
* The buffer is overwritten.
*
*----------------------------------------------------------------------
*/
char *
Net_EtherAddrToString(etherAddrPtr, buffer)
register Net_EtherAddress *etherAddrPtr;
char buffer[18];
{
sprintf(buffer, "%02x:%02x:%02x:%02x:%02x:%02x",
NET_ETHER_ADDR_BYTE1(*etherAddrPtr) & 0xff,
NET_ETHER_ADDR_BYTE2(*etherAddrPtr) & 0xff,
NET_ETHER_ADDR_BYTE3(*etherAddrPtr) & 0xff,
NET_ETHER_ADDR_BYTE4(*etherAddrPtr) & 0xff,
NET_ETHER_ADDR_BYTE5(*etherAddrPtr) & 0xff,
NET_ETHER_ADDR_BYTE6(*etherAddrPtr) & 0xff
);
return(buffer);
}
@
1.2.1.1
log
@Initial branch for Sprite server.
@
text
@d18 1
a18 1
static char rcsid[] = "$Header: /sprite/src/lib/net/RCS/Net_EtherAddrToString.c,v 1.2 90/09/11 14:43:43 kupfer Exp $ SPRITE (Berkeley)";
@
1.1
log
@Initial revision
@
text
@d18 1
a18 1
static char rcsid[] = "$Header: net.c,v 2.0 87/08/11 09:34:20 brent Exp $ SPRITE (Berkeley)";
d23 1
@